The present invention relates generally to an apparatus for decoding of composite video to provide high quality serial digital output and, more particularly, to a combination of unique circuits including a three-dimensional comb filter for providing better separation of composite video into luminance and chrominance components.
Composite video signals have been the standard for most video recording, production and transmission. The composite signal may conform to the National Television System Committee (NTSC) standard in the U.S., most of the Americas, Japan and many other countries, or the Phase Alternating Line (PAL) standard in most of Europe, Africa, and Asia. The composite signal consists of the luminance (Y) signal and the chrominance (C) signal which is encoded on a subcarrier and added to the luminance signal. There is a problem with separating the composite signal back into the Y and C signals because of the process of encoding chroma on the luminance signal. The luminance signal has a frequency response of near direct current (DC) to greater than 4.2 MHz in NTSC and 5.5 MHz in PAL. The chrominance is modulated on a subcarrier of 3.579545 MHz in NTSC and 4.433619 MHz in PAL using a quadrature modulation technique. The two signals are then simply added together. This places the chrominance signal in the high frequency range of the luminance pass band. Simple band split filters leave some of the chrominance signal in the luminance and some of the luminance signal in the chrominance.
Video decoders have been used for several years that use various forms of comb filters to separate the luminance and chrominance signals. Comb filters have been used to achieve full bandwidth or near full bandwidth luminance separation for video recorders, time base correctors (TBCs), video synchronizers, video monitors, Moving Picture Experts Group (MPEG) and Joint Photographic Experts Group (JPEG) compressors and other video devices.
A comb filter is a well known technique that adds or subtracts two or more lines of video to separate the Y and C signals. Comb filters work because the subcarrier phase of every other line is inverted in NTSC signals and every second line is inverted in PAL. The V (R-Y) vector is inverted every other line in PAL resulting in an apparent 90 degree phase shift of the subcarrier per line. In the NTSC system, a simple two line comb adds two lines of video to cancel the chrominance and leave only luminance, and subtracts the two lines to cancel the luminance to extract chrominance. In the PAL system, a simple one line delay comb will separate the V vector from the composite signal requiring another step or technique to separate the U: (B-Y) vector. A so-called PAL modifier is commonly used for this purpose. A two line delay is required to make a comb filter work the same in PAL as it does for NTSC. The problem with simple 2 line comb filters is they cause a vertical smear of the chrominance signal and high frequency luminance signals at vertical transitions in the video signal (e.g., U.S. Pat. No. 3,542,945 to Parker). Three line comb filters average the line above and below the current line before adding or subtracting from the current line. This helps center the smear and reduce its effects. Adaptive comb filters were invented to further minimize the smearing problem (e.g., U.S. Pat. No. 4,240,105 to Faroudja).
An adaptive comb filter switches or fades to a band split technique of separating high frequency chrominance from lower frequency luminance signals when a difference is detected between the current line and the lines that are being used to comb filter. When a difference exists between lines it means that the comb will not extract luminance and chrominance properly and will cause chroma smears, hue shifts, and/or luminance smears (loss of high frequency resolution) at these points. This effect is commonly known as a comb failure.
There are many problems in detecting a change in chrominance between lines of video. The chroma signal is inverted from line to line but the luminance edges of vertical lines are not inverted. Therefore, comparing the high frequency video between two lines at the corners of objects results in a difference signal at the horizontal edge of an object even when the color brightness, hue and saturation are the same. The technique disclosed by Faroudja filters off the high frequency chrominance signal, which also filters off the high frequency luminance, and uses the differences between lines of the remaining low frequency luminance signal to detect a comb fail. The comb fail signal is used to switch from a comb filter to a band split filter for Y/C separation. Another older technique compares the line above and below the current video line to determine comb fail of a 3 line comb filter. This system works well on multiple line vertical edges because the line to line chroma inversion is back in phase every second line. The problem with this technique is it will fail at a vertical transition for two lines causing a rounding of the corners of objects when it switches to band split separation mode at the comb failure point.
Field and frame comb filters cause motion artifacts when they fail. All adaptive techniques have the same problem when they switch to band split mode because the high frequency component contains both luminance and chrominance. This causes a loss of horizontal resolution and luma/chroma crosstalk.
Advances in comb filter design are generally made in the comb fail detection circuits. In general these improvements are an attempt to reduce the luma and chroma smear by combing when combing is appropriate and switching to band split separation when combing would produce a comb smear artifact. There is always a trade off in artifacts due to the fact that objects on the video screen are seldom perfect transitions from one easily distinguishable object to another as a cartoon would be.
In the present state of the art, the most advanced comb filter designs are described in the patents to Raby (U.S. Pat. Nos. 5,424,784 and 5,526,060). The comb filter design disclosed uses demodulated chroma rather than the low frequency luminance data or high frequency composite chroma data to determine comb fail characteristics of the video. The U and V signals can be used as is, converted to RGB (red, green and blue) or HSI (hue, saturation and intensity) to determine comb fail. The HSI signals of three lines are compared and the differences are used as inputs to a lookup table to determine the comb fail threshold. The lookup table is used to determine the ratio of the hue, saturation and intensity differences between lines to determine the comb fail threshold.
The main differences between this invention and prior art comb filters, including those disclosed by the Raby patents, are the concept and type of circuit used to determine the comb fail characteristics, the number of simultaneous taps used, the way this invention is able to continuously vary the weighting factor between filter taps instead of making a full transition away from one tap to another and the use of a noise level measurement to adapt the comb fail characteristics with noise level. The Raby invention separates the high frequency signals from three lines simultaneously, demodulates each of them separately, transforms the demodulated signals to HSI and compares the HSI signals for differences between lines to form a comb fail signal. The present invention does not use any of these operations.
This invention uses a Fast Fourier Transform (FFT) circuit, or a simple band split filter circuit, to determine important characteristics of each line of video without demodulating the signal. These circuits produce a signature signal by which each of the lines can be correlated. The signature signals on various surrounding video lines, that are of opposite subcarrier phase with the current line, are compared to the current line to determine the similarity. The result is used to determine the weighting coefficients of the surrounding lines. There is a cross-coupling of the raw similarity or difference data from the four surrounding lines so that one of the lines can be weighted with a zero coefficient if it is slightly dissimilar but an opposite line is very similar. However, if all four lines are slightly dissimilar they may all be used in an equal proportion of 25% each. If one of the four lines is similar, one is slightly dissimilar and two are very dissimilar, the ratio may be 75% for the similar line, 25% for the slightly dissimilar line, and 0% for the two very dissimilar lines. The logic is biased to achieve a sum of 100% while minimizing the creation of excessive comb artifacts such as a visible smear.
When none of the surrounding lines are similar enough for the comb filter to work properly the comb reverts to a band split mode in a unique way. When all 4 lines are very dissimilar, the current line is passed through a band pass filter to form chrominance. This signal may then be subtracted from the full bandwidth current line to give the equivalent of a filtered luma output with a notch around the subcarrier frequency. There are multiple intermediate sets of steps between 100% comb and 100% band split mode. If one or more of the surrounding lines is not similar enough to be used for 100% combing, a sum of a balancing percentage of the inversion of the current line is used to total to 100%. For example if 25% of one of the surrounding lines is used and 0% of the remaining 3 lines are useful, then 75% of the inversion of the current line will be added to make 100%. The ratio could be in any percentage, however, the steps are limited to 12.5% increments in the present embodiment to reduce cost and fit within the device selected to implement the design. A different implementation may increase the resolution by adding more steps.
Furthermore, with shaded objects the chroma saturation or intensity may increase or decrease over a few video lines. Both the line above and below the current line may be dissimilar but the average of the line above and below may be similar to the current line. The circuit detects this situation and weights the lines above and below equally to create the effect of a similar line after the two lines are summed.
It is also known that noise will modulate the chroma and luma signals and cause a dissimilar indication when the only difference is noise. The noise would therefore cause the comb filter to fail when the combing action of averaging lines would reduce the noise as well as separate the luma and chroma. For this reason the circuit for determining the error signal input to the weighting coefficients uses a noise level code to select higher sets of error values as the noise increases. The net result is that as noise increases more error is required to determine that a line is less similar. As the noise reaches a value where the noise is more objectionable than the smear produced by combing dissimilar lines, the coefficients to all four lines is turned on to 25% each. Furthermore, the adjacent line in the delayed field, that matches the phase of the current line, can also be averaged with the current line to further improve noise reduction in very high noise situations.
This same technique is used to great advantage at edges in the luma signal. By a technique called Dynamic Threshold Modification, the threshold of comb error is momentarily raised when a luma edge is detected to compensate for the fact that a portion of a luma edge will appear in the chroma signature and will make similar lines of chroma seem dissimilar.
The advantage of this type of modification of the comb fail threshold is the threshold can be more sensitive for comb fail in flat areas of chroma without failing unnecessarily at the horizontal transitions. Without Dynamic Threshold Modification the comb fail threshold must be set high enough not to fail on horizontal chroma edges which also causes it not to fail in flat areas of chroma which causes hanging dots due to combing dissimilar lines together.